Enable netrc tests
authorFredrik Eriksson <feffe@fulh.ax>
Thu, 2 Jan 2025 13:59:18 +0000 (14:59 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 3 Jan 2025 13:46:33 +0000 (14:46 +0100)
Test for spaces in usernames and passwords is disabled for now as it's
not supported by current implementation.

Signed-off-by: Fredrik Eriksson <feffe@fulh.ax>
test/testnetrcparser.cpp

index f826edd8db536dc30d3f7544fdc09de7eef7088e..3ab42698dcc2d2d2044497556013fcf16953972f 100644 (file)
@@ -53,11 +53,11 @@ private slots:
 
     void testValidNetrc() {
        NetrcParser parser(testfileC);
-       QEXPECT_FAIL("", "test currently broken, eventually will be fixed", Abort);
        QVERIFY(parser.parse());
        QCOMPARE(parser.find("foo"), qMakePair(QString("bar"), QString("baz")));
        QCOMPARE(parser.find("broken"), qMakePair(QString("bar2"), QString()));
        QCOMPARE(parser.find("funnysplit"), qMakePair(QString("bar3"), QString("baz3")));
+       QEXPECT_FAIL("", "Current implementation do not support spaces in username or password", Continue);
        QCOMPARE(parser.find("frob"), qMakePair(QString("user with spaces"), QString("space pwd")));
     }
 
@@ -69,7 +69,6 @@ private slots:
 
     void testValidNetrcWithDefault() {
        NetrcParser parser(testfileWithDefaultC);
-       QEXPECT_FAIL("", "test currently broken, eventually will be fixed", Abort);
        QVERIFY(parser.parse());
        QCOMPARE(parser.find("foo"), qMakePair(QString("bar"), QString("baz")));
        QCOMPARE(parser.find("dontknow"), qMakePair(QString("user"), QString("pass")));